package com.cp.openfeign;

import com.cp.api.IUserService;
import com.cp.commons.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author feipeng
 * @site www.gcp168.cn
 * @create 2020-08-25 22:18
 */
@FeignClient(value = "provider",/*fallback = HelloServiceFallback.class,*/fallbackFactory =HelloServiceFallbackFactory.class )
public interface HelloService extends IUserService {

    /*@GetMapping("/hello")
    String hello();//这里的方法名可以随意取

    @GetMapping("/hello2")
    String hello2(@RequestParam("name") String name);

    @PostMapping("/user2")
    User addUser(@RequestBody User user);

    @DeleteMapping("/user2/{id}")
    void deleteUserById(@PathVariable("id") Integer id);

    @GetMapping("/user3")
    void getUserByName(@RequestHeader("name") String name);*/
}
